<template>
  <div class="select-wrap">
    <ul class="c-select" v-if="router == 'Select/grade'">
      <li class="c-select-item vux-1px-b" v-for="item in grade" @click="backGrade(item)">{{item}}</li>
    </ul>
    <cascade v-else></cascade>
  </div>
</template>

<script>
  import cascade from './Cascade'
  export default{
    components: { cascade },
    computed: {
      router() {
        return this.$route.name
      },
      grade() {
        return this.$store.state.grade
      }
    },
    methods: {
      backGrade(item) {
        this.$store.commit('SET_crtClassTmp', {grade: item})
        this.$router.go(-1)
      }
    }
  }
</script>

<style lang="less">
  .c-select {
    margin-bottom: 100px;
    &-item {
      line-height: 50px;
      height: 50px;
      list-style: none;
      padding: 0 14px;
      box-sizing: border-box;
      &:active {
        background: #eee;
      }
    }
  }
</style>
